package com.unknowpupil.design.strategy.demo;

/**
 * Created at 2020/12/10 by w10g <br>
 * Initialize Cat ... <br>
 *
 * @author unknowpupil
 * @since 0.0.1
 */
public class Cat implements Comparable<Cat> {
    int weight,height;

    public Cat(int weight, int height) {
        this.weight = weight;
        this.height = height;
    }


    @Override
    public int compareTo(Cat c) {
        if(this.weight<c.weight) return -1;
        else if (this.weight>c.weight) return 1;
        else return 0;
    }

    @Override
    public String toString() {
        return "Cat{" +
                "weight=" + weight +
                ", height=" + height +
                '}';
    }
}
